# 选择结构
money=1000
cost=int(input("请输入取款金额"))
if money >= cost:
    money-=cost
    print('取款成功！')
    if money <= 500:
        print('金额不多了')
    # elif (money>500) and (money<800) :
    elif 500 < money < 800:
        print('还有钱')
    else:
        print('资本家！')
else:
    print('取款失败！金额不足')